'''
@auther:wangyu
@date:开发时间:2022/11/21 14:51
@file:conftest.PY
@desc:
'''
import pytest
import requests
from common.request_define import RequestDefine
@pytest.fixture()
def init_session_obj(request):
    global rd
    rd = RequestDefine()  # 在所有的用例里面要使用rd
    def close_session(): # 关闭session对象
        rd.session.close()
    request.addfinalizer( close_session )  # addfinalizer() 类似yield
    return rd





